package cn.huiyunche.base.service.mappers.ext;

import cn.huiyunche.base.service.vo.PageVo;
import cn.huiyunche.base.service.vo.SServiceOrderAdminVo;
import cn.huiyunche.base.service.vo.SServiceOrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SServiceOrderViewMapper {

    /**
     * 查询服务订单列表
     *
     * @param page
     * @param sServiceOrderVo
     * @return
     */
    List<SServiceOrderAdminVo> selectByConditions(@Param(value = "page") PageVo page, @Param(value = "record") SServiceOrderAdminVo sServiceOrderVo);

    /**
     * 查询服务订单列表 总记录数
     *
     * @param sServiceOrderVo
     * @return
     */
    int count(@Param(value = "record") SServiceOrderAdminVo sServiceOrderVo);

    /**
     * @param customerOrderId 客户订单id
     * @param status          服务订单状态
     * @return
     * @Title: selectByConditions
     * @Description: 根据客户订单id和状态查询服务订单
     * @return: List<SServiceOrderVo>
     */
    List<SServiceOrderVo> selectByCOrderId(@Param("customerOrderId") long customerOrderId, @Param("status") List<Integer> status);

    /**
     * 未调度订单
     *
     * @param date
     * @return
     */
    int notSchedule(@Param(value = "date") Date date);

    /**
     * 已调度服务订单
     *
     * @param date
     * @return
     */
    int alreadySchedule(@Param(value = "date") Date date);

    SServiceOrderAdminVo selectOneByConditions(Long id);
}